
<html>
	<title>Google translation test</title>
<head>	
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=abcdefg"
            type="text/javascript">
</script>
<script type="text/javascript" src="http://www.google.com/jsapi">
  
</script>

<script type="text/javascript">
     var map;
     var lTime = 0;
     var g_LangInit = false;

      google.load("language", "1");

    function loadMap() 
    {

      if (GBrowserIsCompatible()) 
      {
         map = new GMap2(document.getElementById("map"));
         map.setCenter(new GLatLng(22.7, 77.2), 5);
         //panToPlaceAndAddMarker(pLat,pLng,pPlaceName,pUserPhotoUrl)
        var center = new GLatLng(48.89364,  	2.33739);
        map.setCenter(center,5);
        
     }
    }


function
translateToArabia()
{
 var lAngliciaTxt = document.getElementById('anglicia').value;


 google.language.detect(lAngliciaTxt, function(result) {
        if (!result.error && result.language) {
          google.language.translate(lAngliciaTxt, result.language, "ar",
                                    function(result) {
            var translated = document.getElementById('arabia');
	    if (result.translation) {
	       alert(result.translation);
              translated.value = result.translation;
            }
          });
        }
      });
 
}

</script>

</head>
<body onload="loadMap()" onunload="GUnload()">
<div id="coordMapMsgGadget" style="width: 800px; height: 600px;top: 0px;left:0px">
<div id="map" style="float:left;top: 0px;left:0px;width: 600px; height: 300px">
</div>

<div id="locationsGadget" style="left: 5px;background-color: #219999;position: relative;float:left;width: 200px; height: 300px">
</div>
<div style="clear:both;"></div>
<div id="composeMsgGadget" style="float: left;background-color: #2100009;">
<table  bgclor="lightblue" cellspacing=2 cellpadding=2>
<tr><td align=center bgcolor=lightblue colspan="5"><font size=2><b>Compose Message</b></font></td></tr>
<tr><td><font size=2>English:</font></td></td></tr>
<tr><td>
<textarea id="anglicia" rows="2" cols="50">
At you will find all the Web-building tutorials you need, from basic HTML to advanced XML, SQL, ASP, and PHP.
</textarea>
</tr>
<tr><td><font size=2>Arabic:</font></td></tr>
<tr><td>
<textarea id="arabia" rows="2" cols="50">
</textarea>
</td></tr>

<tr><td colspan=2 ><input type=button value="Translate to Arabic" onClick="translateToArabia()">
</td></tr>
</table>
</div>
<div id="ScheduleMsgGadget" style="float: left;background-color: #2100009;">
<table  bgclor="lightblue" cellspacing=2 cellpadding=2>

</table>
</div>

</div>
</body>

</html>


